admin_post_nopriv_{$action}
Action HookDescription
Fires on a non-authenticated admin post request for the given action. The dynamic portion of the hook name, `$action`, refers to the given request action.Hook Information
File Location |
wp-admin/admin-post.php
View on GitHub
|
Hook Type | Action |
Line Number | 58 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into admin_post_nopriv_{$action}
add_action('admin_post_nopriv_{$action}', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-admin/admin-post.php:58
- How this hook is used in WordPress core
<?php
53 * The dynamic portion of the hook name, `$action`, refers to the given
54 * request action.
55 *
56 * @since 2.6.0
57 */
58 do_action( "admin_post_nopriv_{$action}" );
59 }
60 } else {
61 if ( empty( $action ) ) {
62 /**
63 * Fires on an authenticated admin post request where no action is supplied.
PHP Documentation
<?php
/**
* Fires on a non-authenticated admin post request for the given action.
*
* The dynamic portion of the hook name, `$action`, refers to the given
* request action.
*
* @since 2.6.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-admin/admin-post.php
Related Hooks
Related hooks will be displayed here in future updates.